<include file="Public:header" />
<!--产品分类列表-->
<div class="pad_lr_10">
    <div class="J_tablelist table_list" data-acturi="{:U('Role/ajax_edit')}">
        <table width="100%" cellspacing="0" id="J_cate_tree">
            <thead>
            <tr>
                <th width="30"><input type="checkbox" name="checkall" class="J_checkall"></th>
                <th width="60"><span data-tdtype="order_by" data-field="id">ID</span></th>
                <th align="left">角色名称</th>
                <th width="150">{:L('operations_manage')}</th>
            </tr>
            </thead>
            <tbody>
            <volist name="list" id="val">
                <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.id}</td>
                <td align="left"> <if condition="$val['role_id'] neq $roleid and $roleid neq $superroleid">{$val.title}<else /><span data-tdtype="edit" data-field="title" data-id="{$val.id}" class="tdedit">{$val.title}</span></if></td>
                <td align="center">
                    <if condition="$val['id'] eq $roleid or $val['id'] eq $superroleid">
                        无权限 | 无权限
                        <else />
                        <a href="javascript:;" class="J_showdialog" data-uri="{:U('Role/editmenu', array('id'=>$val['id']))}" data-title="设置菜单权限"  data-id="edit" data-width="500" data-height="410">菜单权限</a> |
                        <a href="javascript:void(0);" class="J_confirmurl" data-uri="{:U('Role/delete', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['title'])}">{:L('delete')}</a></td>
                    </if>
                       </tr>
            </volist>

            </tbody>
        </table>
    </div>
    <div class="btn_wrap_fixed">
        <label class="select_all"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('Role/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
    </div>
</div>
<include file="Public:footer" />
<script src="__JS__/jquery/plugins/jquery.treetable.js"></script>
<script>
    $(function(){
        //initialState:'expanded'
        $("#J_cate_tree").treeTable({indent:20,treeColumn:1});
        $(".J_preview").preview();
    });
</script>
</body>
</html>